package biz.alla.market.domain;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "sub_category")
public class SubCategory {
    private int id;
    private String name;
    private Category category;

    @Id
    public int getId() {
	return id;
    }

    public void setId(int id) {
	this.id = id;
    }

    public String getName() {
	return name;
    }

    public void setName(String name) {
	this.name = name;
    }

    @ManyToOne
    @JoinColumn(name = "category_id")
    public Category getCategory() {
	return category;
    }

    public void setCategory(Category category) {
	this.category = category;
    }
}
